<%--
  Created by IntelliJ IDEA.
  User: 小胡
  Date: 2021/5/30
  Time: 20:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="https://cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
    <link href="https://cdn.bootcss.com/pace/1.0.2/themes/pink/pace-theme-flash.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="../plugins/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" type="text/css" href="../css/fs.css" media="all"/>
    <script type="text/javascript" src="../plugins/layui/layui.js"></script>
    <script type="text/javascript" src="../plugins/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="../plugins/frame/js/fs.js?v=1.5.0"></script>
    <script type="text/javascript" src="../plugins/frame/js/frame.js?v=1.5.0"></script>
</head>
<body>


<div class="layui-col-md12">
    <div class="layui-form-query">
        <form class="layui-form" id="query_form" >
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-mid">书名：</label>
                    <div class="layui-input-inline" style="width: 100px;">
                        <input type="text" name="name" autocomplete="off" class="layui-input"/>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-mid">作者：</label>
                    <div class="layui-input-inline" style="width: 100px;">
                        <input type="text" name="author" autocomplete="off" class="layui-input"/>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-mid">未上架：</label>
                    <div class="layui-input-inline" style="width: 100px;">
                        <input type="checkbox" name="check" lay-skin="switch" value="0" lay-text="开启|关闭">
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <button class="layui-btn" type="button" function="query" tableId="fsDatagrid" ><i
                                class="layui-icon">&#xe615;</i>查询
                        </button>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

<button class="layui-btn layui-btn-normal" function="top" topUrl="bookDetail.jsp" topMode="add" topWidth="700px"
        topHeight="680px" topTitle="新增用户">
    <i class="layui-icon">&#xe654;</i>新增
</button>
<button class="layui-btn layui-btn-danger" function="submit" url="/admin/delBook" isMutiDml="1" isConfirm="1"
        confirmMsg="是否确定删除选中的数据？" inputs="id">
    <i class="layui-icon">&#xe640;</i>删除
</button>

<button class="layui-btn" style="background-color:#5FB878"  function="refresh">
    <i class="layui-icon">&#x1002;</i>刷新
</button>
<table id="fsDatagrid" lay-filter="fsDatagrid" class="fsDatagrid" isLoad="1" url="/admin/book"
       isPage="1" defaultForm="query_form" height="full-135" page-size="10" >
</table>
<div class="fsDatagridCols">
    <p checkbox="true"/>
    <p type='numbers' title='序号' />
    <p field='name' title='属性' width='150' />
    <p field="author" title="作者" width="150" sort="true"/>
    <p field="description" title="描述" width="180" />
    <p field="status" title="状态" width="90" templet="#stateTpl"/>
    <p fixed="right" align="center" toolbar="#barDemo" title="操作" width="220"/>


    <script type="text/html" id="stateTpl">
        <input type="checkbox" name="status" lay-skin="switch" disabled lay-text="上架|未上架" {{ d.status == 1 ? 'checked' : '' }}>
    </script>
    <script type="text/html" id="barDemo">
        <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="top" topUrl="bookDetail.jsp"
           topMode="readonly" topWidth="800px" topHeight="350px" topTitle="查看公告信息" inputs="id:">查看</a>
        <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="top" topUrl="bookDetail.jsp"
           topMode="edit" topWidth="800px" topHeight="350px" topTitle="查看公告信息" inputs="id:">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" url="/admin/delBook"
           lay-event="submit" inputs="id:" isConfirm="1"
           confirmMsg="是否确定删除选中的数据？">删除</a>
    </script>
</div>


</body>
</html>
